#ifndef SALESMANENVIRONMENT_H_
#define SALESMANENVIRONMENT_H_

#include "AbstractEnvironment.h"
#include "SalesmanData.h"

/**
  * Class that represents travelling salesman problem solving environment
  * @author Łukasz Szybka
  */
class SalesmanEnvironment : public AbstractEnvironment
{
public:
    SalesmanEnvironment(int _populationSize, SalesmanData _salesmanData, bool _greedyStart = false);
    ~SalesmanEnvironment();

    QString decodeChromosome(const Chromosome& chrom);

    void setGreedyStart(bool _greedyStart);
    void setSalesmanData(SalesmanData _salesmanData);

protected:
    void fitnessFunction(Chromosome& chrom);

    void createPrimaryGenaration();

private:
    SalesmanData salesmanData;

    bool greedyStart;
};

#endif /*SALESMANENVIRONMENT_H_*/
